package com.yidu.qianfeng.mapper;

import com.yidu.qianfeng.common.bean.Vehicle.CarInfo;
import com.yidu.qianfeng.common.bean.client.Consignee;
import com.yidu.qianfeng.common.bean.client.Shipper;
import com.yidu.qianfeng.common.bean.company.EmpInfo;
import com.yidu.qianfeng.common.bean.company.Subst;
import com.yidu.qianfeng.common.bean.transport.TrackWaybill;
import com.yidu.qianfeng.common.bean.transport.TrackWrap;
import com.yidu.qianfeng.common.bean.transport.TransportProtocol;
import com.yidu.qianfeng.common.bean.transport.TruckLoading;
import com.yidu.qianfeng.common.bean.waybill.Waybill;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Repository("truckMapper")
@Mapper
public interface TruckMapper {
     List<TrackWrap> selectwaybill(@Param("page") int page, @Param("limit")int limit, @Param("waybill") TrackWrap waybill, @Param("status")String status);

     List<Subst> selectsubtype();

    List<Waybill> selectsavecar(@Param("page") int page, @Param("limit")int limit,String id);

     List<Waybill> screenselect();

     List<Shipper> departselect();

     List<Waybill> selectcar(@Param("page") int page, @Param("limit")int limit);

    int changeState(@Param("id")int id);

     int removecar(@Param("id")int id);

    int savecar(@Param("id")int id);

    int removecartwo(@Param("id")int id);

    int insertcar(@Param("loading")TruckLoading loading);

    int insertprotocol(@Param("pro") TransportProtocol pro);

    Waybill selectsavecartow(int id);

    List<TruckLoading> selecttruckloading(@Param("page") int page, @Param("limit")int limit);

    int deletecarone(@Param("id") int id);

    int updatecar(@Param("loading") TruckLoading loading);

    int selectcarnum();

    int selectwaybillnum(@Param("status") String status);

    int updatecarstatus(@Param("ids") String ids);

    int selectcarnumtwo();

    List<TrackWrap> depatlist(@Param("page") int page, @Param("limit") int limit,@Param("wrap") TrackWrap wrap);

    int depatlistnum();

    int relation(@Param("ids") String ids,@Param("trucknum") String  trucknum);

    String selecttrucknum(@Param("ids") String ids);

    int deleterelation(@Param("str")int str);

    List<TruckLoading> selectcarlist(@Param("id")String id);

    int selectdriver(@Param("info") CarInfo info);

    int insertdriver(@Param("info")CarInfo info);

    int insertconsignee(@Param("con")Consignee con);

    int selectconsignee(@Param("con")Consignee con);

    int deletecarlist(@Param("id")String id);

    int updateprotocols(@Param("pro") TransportProtocol pro);

    int updatecarone(@Param("id") int id);

    List<TrackWrap> selectdriverinfo(@Param("carDriver")String carDriver,@Param("startingSubst")String startingSubst);

    List<Consignee> selectconsinfo(@Param("consiCom")String consiCom);

    Subst selectsubtypeone(@Param("info") CarInfo info);

    EmpInfo selectUser(@Param("username")String username);

    int selectpand(@Param("id")String id);

    List<TrackWaybill> selectwaybilllist(@Param("waybillConsignNum")String waybillConsignNum);

    int selectdelnum(@Param("str") String str);
}
